package com.xixing.weixin.domain;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.roo.addon.dod.RooDataOnDemand;

@RooDataOnDemand(entity = Weixin.class)
public class WeixinDataOnDemand {

    @Autowired
    private AccountDataOnDemand accountDataOnDemand;

    public void initDB() {
        accountDataOnDemand.initDB();

    }

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:META-INF/spring/applicationContext*.xml");
        WeixinDataOnDemand bean = context.getBean(WeixinDataOnDemand.class);
        bean.initDB();

    }
}
